#pragma once
#ifndef xManager_h__
#define xManager_h__

#include "../../../dxhead/dxegheader.h"
#include "../../../xlib/xlib.h"
#include "xIManager.h"
namespace NTools
{
	class xManager
	{
	public:
		template <typename TClass>
		TResult CreateManager()
		{
			static TClass* cls = NLib::xSingleton<cls>::GetSingleton();
			if(VNull == cls){
				myTrace0(eLevel_Middle,"VNull == NLib::xSingleton<cls>::GetInstance()");
				return XE_NOMEMORY;
			}
			return XE_OK;
		}
		template <typename TClass>
		TClass* GetManager()
		{
			TClass* cls = NLib::xSingleton<TClass>::GetSingleton();
			if(VNull == cls){
				myTrace0(eLevel_Middle,"VNull == NLib::xSingleton<cls>::GetInstance()");
				return VNull;
			}
			return cls;
		}
		template <typename TClass>
		TResult DeleteManager()
		{
			NLib::xSingleton<TClass>::Destroy();
			return XE_OK;
		}
	};
}

#endif // xManager_h__